{extend name="base" /}
{block name="body"}
<div class="layui-card">
	<div class="layui-card-body">
		<table class="layui-table layui-form">
			<thead>
				<tr>
                                    <th>提醒时间</th>
					<th>客户名称</th>
					<th>手机号码</th>
					<th>提醒方式</th>
					<th>提醒备注</th>
					<th>创建时间</th>
                                        <th>处理时间</th>
                                        <th>处理情况</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				{foreach name="list" item="v" empty="$empty"}
                                <?php $customer = \app\common\model\Customer::get($v['cid']); ?>
				<tr>
                                    <td><?php echo date('Y-m-d',$v['remind_time'])?></td>
                                    <td><a href="{:url('user/customer/show', ['id' => $customer.id])}" class="layui-btn layui-btn-normal">{$customer.cname}</a></td>
					<td>{$customer.mobile}</td>
                                        <td>
                                            {if isset($v.jdata.web) and $v.jdata.web =='on'}<i class="fa fa-comment" aria-hidden="true" title="后台提醒"></i> {/if}
                                            {if isset($v.jdata.wechat) and $v.jdata.wechat =='on'}<i class="fa fa-weixin" aria-hidden="true" title="微信提醒"></i> {/if}
                                            {if isset($v.jdata.sms) and $v.jdata.sms =='on'}<i class="fa fa-envelope-open" aria-hidden="true" title="短信提醒"></i> {/if}
                                        </td>
                                        <td>{$v.remark}</td>
					<td>{$v.create_time}</td>
                                        <td>{$v.status_time|default='无'}</td>
                                        <td>{$v.status_remark|default='无'}</td>
					<td>
                                            {if $v['status']=='0'}
                                            <a href="{:url('user/customer/set_remind', ['id' => $v.id])}" class="layui-btn layui-btn-normal"><i class="fa fa-edit"></i> 未处理</a>
                                            {else}
                                            <a href="{:url('user/customer/set_remind', ['id' => $v.id])}" class="layui-btn layui-btn-info"><i class="fa fa-edit"></i> 已处理</a>
                                            {/if}
                                            <a href="{:url('user/customer/del_remind', ['id' => $v.id])}" class="layui-btn layui-btn-danger ajax-delete"><i class="fa fa-trash-o"></i> 删除</a>
					</td>
				</tr>
				{/foreach}
			</tbody>
		</table>
		<div class="page">{$list->render()}</div>
	</div>
</div>
{/block}